const mongoose = require('mongoose');

mongoose.connect('mongodb+srv://majiaqi:majiaqi@zg6.wx0umyh.mongodb.net/?retryWrites=true&w=majority&appName=zg6')
    .then(() => {
        console.log('连接成功');
    })
    .catch((err) => {
        console.log('数据库连接失败:', err);
    });

// 导出整个mongoose对象
module.exports = mongoose;
